import request from '@/utils/request'

// 查询员工列表
export const getEmpListApi = ({ name, gender, begin, end, page, pageSize }) =>
  request.get(
    `/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`
  )

// 删除员工
export const deleteEmpApi = (ids) => request.delete(`/emps?ids=${ids}`)

// 添加员工
export const addEmpApi = (emp) => request.post('/emps', emp)

// 根据ID查询员工
export const getEmpByIdApi = (id) => request.get(`/emps/${id}`)

// 修改员工
export const updateEmpApi = (emp) => request.put('/emps', emp)

// 查询全部员工
export const getAllEmpListApi = () => request.get('/emps/list')
